Returns True if launch was sucessful, false otherwise.
Example pf.launch()
» true
Notes This verb uses the information in the pf.appInfo table to find and launch the Pocket Forth application. By default the program launches a program named Pocket Forth copy, to encourage you to keep an untouched copy of Pocket Forth available. The main window keeps you apprised of the action during the launch process. Most of the other verbs will call pf.launch if Pocket Forth is not running. This verb will function on an unextended copy of Pocket Forth.
See Also pf.quit
Verb pf.load
Syntax pf.load(file)
Parameters File is any valid Frontier file description.
Action Interpret the specified file with Pocket Forth.
Returns True if the designated text file is opened by Pocket Forth, false otherwise.
Example pf.load("Hard Disk:Pocket6.3:Examples:Graphics")
» true
Notes This verb sends one of the required Apple Events (aevt,odoc) to Pocket Forth, so it functions without extending Pocket Forth.
Verb pf.paste
Syntax pf.paste()
Parameters None required
Action Interpret the text on the clipboard with Pocket Forth.
Returns True if Pocket Forth can interpret TEXT data on the clipboard, false otherwise.
Example pf.paste()
» true
Notes This verb sends a misc,past Apple Event to Pocket Forth. If the AppleEvents file has been loaded into Pocket Forth, Pocket Forth will interpret the text as if you had pasted it in by hand.
Verb pf.quit
Syntax pf.quit()
Parameters None required
Action Cause the Pocket Forth application to quit. Frontier's main window will display "Pocket Forth disconnected" if no error occurs.
Returns True
Example pf.quit()
» true
Notes This verb sends a aevt,quit Apple Event to Pocket Forth, causing Pocket Forth to quit, as if 'bye' had been executed. Since this is a required event, Pocket Forth responds to this verb without extention.
See Also pf.launch
Verb pf.request
Syntax pf.request(string)
Parameters String is one of four legal data types: "short", "long", "float" and "string".
Action Pop number(s) from the data stack.
Returns A 16 bit integer, 32 bit integer, an 80 bit extended format floating point number or the string pointed to by the relative address on the stack.
Example pf.request("short")
» 42
pf.request("long")
» 104378
pf.request("float")
» 6.02e23
pf.request("string")
» This is a test!
Notes This verb sends a misc,eval Apple Event to Pocket Forth which returns a string back to the client program (Frontier) in the reply event. If the data stack is empty, "Empty stack." is returned, if the parameter string is illegal, "Unknown type." is returned.
Verb pf.send
Syntax pf.send(string)
Parameters string is up to 80 characters of text.
Action Interpret the string parameter with Pocket Forth.
Returns True if Pocket Forth accepted the data, false otherwise.
Example pf.send("beep beep beep")
» true
Notes Pocket Forth will accept the string as if it had been typed in and return pressed. The input is NOT echoed to Pocket Forth's window, but any output is, including the "ok" prompt. If the text is good code, it will be interpreted in the background.